gtk4.git
5 years agogtk/window: Make 'default-size' adapt to configured size
Jonas Ådahl [Sat, 5 Dec 2020 10:44:51 +0000 (11:44 +0100)]
gtk/window: Make 'default-size' adapt to configured size

This commit changes the behavior of window size computation and the
default size properties to:

 * The default-width and default-height properties are updated to the
   current window size unless the size is fixed by e.g. being maxmized,
   tiled etc.
 * The compute-size semantics are to just pick the default size, or if
   not adequate, use the measured size, and consequently update the
   default size, unless unresizable.
 * gtk_window_get_size() is removed, what's more likely relevant is the
   gtk_window_get_default_size() which will now contain more sensible
   values.

Various places that used gtk_window_get_size() were updated to use
gtk_window_get_default_size() to remember and restore previous sizes.

This also changes the default value of 'default-width' and
'default-height' from -1 to 0. The gtk builder simplify tool is taught
how to omit when the default size is set to both -1 and 0.

5 years agox11/surface: Avoid resizing if computed size didn't change
Jonas Ådahl [Sat, 5 Dec 2020 10:40:47 +0000 (11:40 +0100)]
x11/surface: Avoid resizing if computed size didn't change

This fixes an issue where we'd resize to the previous window size during
interactive resize.

5 years agox11/surface: Move the scattered compute-size calls to helper
Jonas Ådahl [Sat, 5 Dec 2020 10:38:17 +0000 (11:38 +0100)]
x11/surface: Move the scattered compute-size calls to helper

This simplifies things, and fixes issue where we'd resize the wrong
time, and miss resizing other times.

5 years agox11/surface: Remember the toplevel layout
Jonas Ådahl [Sat, 5 Dec 2020 10:30:45 +0000 (11:30 +0100)]
x11/surface: Remember the toplevel layout

5 years agox11/surface: Compute size after update too
Jonas Ådahl [Sat, 5 Dec 2020 10:13:07 +0000 (11:13 +0100)]
x11/surface: Compute size after update too

This will sometimes mean a frame is skipped if a resize was requested
during the update phase of the frame dispatch. Not doing so can cause
trying to allocate a window smaller than the minimum size of the widget.

5 years agox11/surface: Remember when there is a pending ConfigureNotify
Jonas Ådahl [Sat, 5 Dec 2020 10:02:58 +0000 (11:02 +0100)]
x11/surface: Remember when there is a pending ConfigureNotify

This will be used to decide whether to try to resize windows when .

5 years agogdk/surface: Allow inhibit layout from backend
Jonas Ådahl [Fri, 4 Dec 2020 23:11:08 +0000 (00:11 +0100)]
gdk/surface: Allow inhibit layout from backend

If compute_size() returns TRUE, the layout will not be propagated to
GTK. This will be used by the X11 backend to queue asynchronous resizes
that shouldn't yet allocate in GTK.

5 years agox11: Use resize counting for freezing updates too
Jonas Ådahl [Fri, 4 Dec 2020 23:07:21 +0000 (00:07 +0100)]
x11: Use resize counting for freezing updates too

It's already keep strack of when we're waiting for configure events, so
lets reuse it. This fixes an issue where reshown dialogs wouldn't
reappear.

5 years agowayland/surface: Reset last sent min/max size when hiding
Jonas Ådahl [Fri, 4 Dec 2020 17:39:22 +0000 (18:39 +0100)]
wayland/surface: Reset last sent min/max size when hiding

As with the window geometry, the last sent min/max values must be reset
so they are sent again next time the surface is shown.

5 years agowayland/surface: Clear shadow width when hiding
Jonas Ådahl [Fri, 4 Dec 2020 17:35:01 +0000 (18:35 +0100)]
wayland/surface: Clear shadow width when hiding

Not doing this means the next time the same surface is shown, if the
shadow size wasn't changed, it wouldn't be sent to the compositor, which
then would result in compositor deriving its own window geometry which
would include the shadow margin.

This fixes an issue where the file chooser dialog would grow each time
it opened.

5 years agox11/surface: Compute toplevel size outside of frame dispatch
Jonas Ådahl [Fri, 4 Dec 2020 14:40:53 +0000 (15:40 +0100)]
x11/surface: Compute toplevel size outside of frame dispatch

We can't compute and resize a toplevel size during dispatch, as resizing
on X11 is an asynhronous operation, requiring a configuration event.

5 years agotests/animated-resizing: Don't try to resize during frame dispatch
Jonas Ådahl [Fri, 4 Dec 2020 14:02:59 +0000 (15:02 +0100)]
tests/animated-resizing: Don't try to resize during frame dispatch

This will not work on X11 because it's too late to resize, due to
resizing being asynchronous i.e. it won't be complete before we need to
draw.

5 years agogtk/native: Remove gtk_native_check_resize()
Jonas Ådahl [Fri, 4 Dec 2020 10:18:09 +0000 (11:18 +0100)]
gtk/native: Remove gtk_native_check_resize()

This is now handle by the corresponding implemenatations using per
non-gobject-type API.

5 years agogtk/dragicon: Use private gtk_drag_icon_present() instead of GtkNative
Jonas Ådahl [Fri, 4 Dec 2020 10:11:05 +0000 (11:11 +0100)]
gtk/dragicon: Use private gtk_drag_icon_present() instead of GtkNative

It didn't even use GtkNative, just the vfunc it set to the interface
sturct.

5 years agogtk/tooltipwindow: Use gtk_tooltip_window_present() instead of GtkNative
Jonas Ådahl [Fri, 4 Dec 2020 10:06:25 +0000 (11:06 +0100)]
gtk/tooltipwindow: Use gtk_tooltip_window_present() instead of GtkNative

5 years agogtk/texthandle: Use gtk_text_handle_present() instead of GtkNative
Jonas Ådahl [Fri, 4 Dec 2020 09:53:16 +0000 (10:53 +0100)]
gtk/texthandle: Use gtk_text_handle_present() instead of GtkNative

5 years agogtk/window: Don't go via GtkNative when presenting
Jonas Ådahl [Fri, 4 Dec 2020 08:23:46 +0000 (09:23 +0100)]
gtk/window: Don't go via GtkNative when presenting

It'll only call directly back into GtkWindow's toplevel present handling
code.

5 years agogtk/popover: Use gtk_popover_present() instead of going via GtkNative
Jonas Ådahl [Fri, 4 Dec 2020 08:20:50 +0000 (09:20 +0100)]
gtk/popover: Use gtk_popover_present() instead of going via GtkNative

This makes it more explicit that managers of popovers make it "present".

5 years agogtk/entry: Remove emoji chooser field
Jonas Ådahl [Fri, 4 Dec 2020 08:15:53 +0000 (09:15 +0100)]
gtk/entry: Remove emoji chooser field

It wasn't ever set.

5 years agogtk/popover: Request fake motion events for popovers too
Jonas Ådahl [Fri, 4 Dec 2020 08:12:22 +0000 (09:12 +0100)]
gtk/popover: Request fake motion events for popovers too

As with GtkWindow, we need to request fake motion events if allocation
changes, to emulate motion events given the new layout.

5 years agogdk/surface: Emit layout event while frozen
Jonas Ådahl [Fri, 4 Dec 2020 07:04:58 +0000 (08:04 +0100)]
gdk/surface: Emit layout event while frozen

The allocation of popups are part dependent of the allocation of the
root, which means the root must still be allocated when updates are
frozen, otherwise we'll try to allocate non-laid out popups.

5 years agogdk/popup: Remove the popup-layout-changed signal
Jonas Ådahl [Thu, 3 Dec 2020 22:20:31 +0000 (23:20 +0100)]
gdk/popup: Remove the popup-layout-changed signal

It was replaced with GdkSurface::layout.

5 years agogtk/window: Only fake motion events on windows with pending allocations
Jonas Ådahl [Thu, 3 Dec 2020 21:50:31 +0000 (22:50 +0100)]
gtk/window: Only fake motion events on windows with pending allocations

This fixes an issue where the focus of the window continuously received
fake motion events even when a popover was open, making input events end
up behind the popover.

It also adds a comment describing why motion events are requested. Note
that popovers won't work with this, and it's possible both in the past
and now that sporadic missplaced motion events will appear, e.g. when a
window changes allocation but a popover is open.

5 years agogdk/toplevelsize: Rename 'margin' to 'shadow' and 'shadow_width'
Jonas Ådahl [Wed, 2 Dec 2020 16:08:43 +0000 (17:08 +0100)]
gdk/toplevelsize: Rename 'margin' to 'shadow' and 'shadow_width'

This makes it more consistent with everywhere else.

5 years agogdk: Remove GdkSurface::size-changed
Jonas Ådahl [Wed, 2 Dec 2020 16:08:07 +0000 (17:08 +0100)]
gdk: Remove GdkSurface::size-changed

It's not emitted, and everyone should use the GdkSurface::layout signal
from now on.

5 years agogtk/window: Minor cleanup
Jonas Ådahl [Wed, 2 Dec 2020 15:44:59 +0000 (16:44 +0100)]
gtk/window: Minor cleanup

5 years agogtk/window: Remove out-dated comment
Jonas Ådahl [Wed, 2 Dec 2020 15:44:49 +0000 (16:44 +0100)]
gtk/window: Remove out-dated comment

5 years agogtk/window: Use default size if non-resizable if set
Jonas Ådahl [Wed, 2 Dec 2020 15:44:25 +0000 (16:44 +0100)]
gtk/window: Use default size if non-resizable if set

5 years agogdk: Replace all GDK_CONFIGURE usage with GdkSurface::layout
Jonas Ådahl [Wed, 2 Dec 2020 14:29:54 +0000 (15:29 +0100)]
gdk: Replace all GDK_CONFIGURE usage with GdkSurface::layout

This removes the GDK_CONFIGURE event and all related functions and data
types; it includes untested changes to the MacOSX, Win32 and Broadway
backends.

5 years agogdk: Always get shadow width via GdkToplevelSize
Jonas Ådahl [Wed, 2 Dec 2020 13:58:45 +0000 (14:58 +0100)]
gdk: Always get shadow width via GdkToplevelSize

This removes the gdk_surface_set_shadow_width() function and related
vfuncs. The point here is that the shadow width and surface size can now
be communicated to GDK atomically, meaning it's possible to avoid
intermediate stages where the surface size includes the shadow, but
without the shadow width set, or the other way around.

5 years agowayland: Stop emitting size-changed
Jonas Ådahl [Wed, 2 Dec 2020 13:13:32 +0000 (14:13 +0100)]
wayland: Stop emitting size-changed

It's dealt with by GdkSurface::layout now.

5 years agogtk: Allocate everything from GtkNativeClass::layout
Jonas Ådahl [Wed, 2 Dec 2020 10:59:23 +0000 (11:59 +0100)]
gtk: Allocate everything from GtkNativeClass::layout

This changes allocation of the widget trees to happen as a side effect
to the GdkSurface::layout signal, which first passes the GtkNative
instance where it is then forwarded to the implementations of the
GtkNative interface.

The implementations of GtkNative are the ones doing the actual
gtk_widget_allocate(), and they do so in their GtkNativeClass::layout
function.

5 years agogtk/window: Only deal with shadow when (ex|in)cluding csd size
Jonas Ådahl [Wed, 2 Dec 2020 16:42:42 +0000 (17:42 +0100)]
gtk/window: Only deal with shadow when (ex|in)cluding csd size

The size should correspond what gtk_widget_measure() does, and it
measures what's within the window excluding the shadow; so make this
helper function correspond to this.

5 years agogdk/wayland: Always compute-size if GTK asked fer layout
Jonas Ådahl [Wed, 2 Dec 2020 10:50:55 +0000 (11:50 +0100)]
gdk/wayland: Always compute-size if GTK asked fer layout

5 years agogdk/wayland: Always configured size when resizing
Jonas Ådahl [Wed, 2 Dec 2020 10:38:17 +0000 (11:38 +0100)]
gdk/wayland: Always configured size when resizing

GTK4 doesn't support arbitrary constraints when resizing a window (e.g.
steps, or aspect ratio), so we don't need to care about the result from
compute-size when doing interactive resizing.

5 years agogdk/toplevelsize: Don't complain if only shadow extends out of bounds
Jonas Ådahl [Wed, 2 Dec 2020 09:57:32 +0000 (10:57 +0100)]
gdk/toplevelsize: Don't complain if only shadow extends out of bounds

5 years agogtk/window: Remove gtk_window_resize()
Jonas Ådahl [Wed, 2 Dec 2020 09:25:22 +0000 (10:25 +0100)]
gtk/window: Remove gtk_window_resize()

Use gtk_window_set_default_size() or change the size of the widget
inside the window to get the same effect.

5 years agotestsuite: Remove test for gtk_window_resize()
Jonas Ådahl [Wed, 2 Dec 2020 13:17:29 +0000 (14:17 +0100)]
testsuite: Remove test for gtk_window_resize()

And use gtk_window_set_default_size() in the other place.

5 years agotests/testgtk: Remove 'Resize' button
Jonas Ådahl [Wed, 2 Dec 2020 09:21:12 +0000 (10:21 +0100)]
tests/testgtk: Remove 'Resize' button

The gtk_window_resize() API is going away, so remove this test.

5 years agotests/animated-resizing: Resize widget instead of window
Jonas Ådahl [Wed, 2 Dec 2020 09:18:04 +0000 (10:18 +0100)]
tests/animated-resizing: Resize widget instead of window

This means the window needs to be marked as non-resizable, otherwise it
won't shrink.

5 years agotests: Use gtk_window_set_default_size() when appropriate
Jonas Ådahl [Wed, 2 Dec 2020 09:08:46 +0000 (10:08 +0100)]
tests: Use gtk_window_set_default_size() when appropriate

Replace the usage of gtk_window_resize() with
gtk_window_set_default_size() where possible.

5 years agogtk/expander: Remove manual call to gtk_window_resize()
Jonas Ådahl [Wed, 2 Dec 2020 08:56:55 +0000 (09:56 +0100)]
gtk/expander: Remove manual call to gtk_window_resize()

It happens implicitly for a non-resizeable window.

5 years agogdk/x11: Flush layout changes to the frame clack dispatch
Jonas Ådahl [Wed, 2 Dec 2020 08:45:31 +0000 (09:45 +0100)]
gdk/x11: Flush layout changes to the frame clack dispatch

This follows the trail of the Wayland backend in that GdkSurface changes
happen during the layout phase, and that a GDK_CONFIGURE no longer being
used to communicate the size changes of a surface; this now also uses
the layout signal on the GdkSurface.

5 years agogdk/surface: Try to reschedule pending phase until dispatched
Jonas Ådahl [Wed, 2 Dec 2020 08:39:48 +0000 (09:39 +0100)]
gdk/surface: Try to reschedule pending phase until dispatched

If a surface scheduled a relayout, got frozen, and a layout phase
happened, then got unfrozen, it wouldn't see it's layout being
requested; avoid this race by remembering the pending phases until they
actually happened.

5 years agogdk/surface: Make backends aware of when layout is requested
Jonas Ådahl [Wed, 2 Dec 2020 08:12:01 +0000 (09:12 +0100)]
gdk/surface: Make backends aware of when layout is requested

5 years agox11: Remove handling of 'substructure' events
Jonas Ådahl [Tue, 1 Dec 2020 10:10:59 +0000 (11:10 +0100)]
x11: Remove handling of 'substructure' events

Reading the comment, it seems to be related being a window manager
decoration utility; this is not something GTK4 aims to handle, just drop
support for this.

5 years agowayland: Layout drag icon from GdkSurface::layout
Jonas Ådahl [Wed, 25 Nov 2020 14:06:09 +0000 (15:06 +0100)]
wayland: Layout drag icon from GdkSurface::layout

5 years agogtk/dragicon: Don't show until child is set
Jonas Ådahl [Wed, 25 Nov 2020 14:02:26 +0000 (15:02 +0100)]
gtk/dragicon: Don't show until child is set

Showing before the child would result in bogus
gdk_drag_surface_present() with an "empty" (1x1) size. This can easily
be avoided by postponing showing until there is anything to show.

5 years agowayland: Communicate popup layout changes via GdkSurface::layout
Jonas Ådahl [Wed, 25 Nov 2020 10:48:08 +0000 (11:48 +0100)]
wayland: Communicate popup layout changes via GdkSurface::layout

By moving popup layout emission to the layout phase, the current
GdkPopup::poup-layout-changed signal has no value on its own as it'd be
ignored by GtkPopover.

Make the Wayland backend communicate the popup layout changes via the
common signal; but leave the rest intact until other backends catch up.

5 years agowayland/surface: Restructure fields used for the next layout
Jonas Ådahl [Wed, 25 Nov 2020 10:28:45 +0000 (11:28 +0100)]
wayland/surface: Restructure fields used for the next layout

Put them in a anonymous struct, and separate the toplevel specific ones
into another anonymous struct inside the first one. Later popup related
fields will be added.

5 years agogdk/surface: Remove left-over signal enum value
Jonas Ådahl [Wed, 25 Nov 2020 10:14:33 +0000 (11:14 +0100)]
gdk/surface: Remove left-over signal enum value

The popup-layout-change signal was moved to GdkPopup, but the enum was
never removed from GdkSurface.

5 years agogdk/frame-clock: Remove the newly added 'compute-size' phase
Jonas Ådahl [Tue, 24 Nov 2020 22:18:42 +0000 (23:18 +0100)]
gdk/frame-clock: Remove the newly added 'compute-size' phase

What was previously done in the layout phase is now done in response to
a GdkSurface signal, which means size computation can happen on layout.

5 years agowayland/surface: Compute size on layout
Jonas Ådahl [Tue, 24 Nov 2020 22:16:48 +0000 (23:16 +0100)]
wayland/surface: Compute size on layout

Stop using the 'compute-size' phase of the frame clock, use the layout
phase instead, now that GTK isn't using the layout phase anymore.

5 years agoPass the layout signal via GdkSurface to GtkRoot
Jonas Ådahl [Tue, 24 Nov 2020 21:02:53 +0000 (22:02 +0100)]
Pass the layout signal via GdkSurface to GtkRoot

Don't have GtkRoot listen directly to the layout signal on the frame
clock, but let it pass through GdkSurface. This will allow GdkSurface to
be more involved in the layout phase.

5 years agogdk/surface: Make pending schedule a phase enum
Jonas Ådahl [Tue, 24 Nov 2020 21:00:38 +0000 (22:00 +0100)]
gdk/surface: Make pending schedule a phase enum

Scheduling an update when frozen would reschedule when unfrozen; change
this to a generic pending phase enum, and use this for resrcheduling
paint and compute-size.

5 years agogtk/root: Validate css node after update
Jonas Ådahl [Tue, 24 Nov 2020 17:33:05 +0000 (18:33 +0100)]
gtk/root: Validate css node after update

It should happen before layout, but after the animation tick, thus after
the update.

5 years agowayland: Concentrate size computation to 'compute-size' phase
Jonas Ådahl [Tue, 24 Nov 2020 15:05:26 +0000 (16:05 +0100)]
wayland: Concentrate size computation to 'compute-size' phase

This includes computing the surface size, including shadow margin,
setting the surface size, during the 'compute-size' clock phase.

5 years agowayland/surface: Don't save uninitialized size
Jonas Ådahl [Tue, 24 Nov 2020 21:58:02 +0000 (22:58 +0100)]
wayland/surface: Don't save uninitialized size

GdkSurface's are initialized to have the size 1x1, as otherwise we'd
receive an X11 error, would a corresponding X11 window be created.

This confuses the "saved size" mechanisms in the Wayland backend, as
treats 0 as uninitialized, and not 1.

Fix this simply not saving size that if it's smaller or equal than 1.

5 years agogdk/surface: Add API to request 'compute-size' clock phase
Jonas Ådahl [Tue, 24 Nov 2020 15:03:07 +0000 (16:03 +0100)]
gdk/surface: Add API to request 'compute-size' clock phase

5 years agogdk/surface: Use helper to emit 'size-changed' signal
Jonas Ådahl [Tue, 24 Nov 2020 15:02:23 +0000 (16:02 +0100)]
gdk/surface: Use helper to emit 'size-changed' signal

5 years agogdk/toplevelsize: Add way to set margin
Jonas Ådahl [Tue, 24 Nov 2020 14:51:56 +0000 (15:51 +0100)]
gdk/toplevelsize: Add way to set margin

Will be used to communicate the shadow margin, instead of using
gdk_surface_set_shadow_width().

Also set these values in gtkwindow.c.

5 years agoframe-clock: Add 'compute-size' phase
Jonas Ådahl [Tue, 24 Nov 2020 14:02:35 +0000 (15:02 +0100)]
frame-clock: Add 'compute-size' phase

This will be handled between 'update' (which may trigger animation
ticks, CSS update, etc) and 'layout' which will allocate the widget
tree. It's meant to perform surface size computation, and is done
between these two phases in order to have an up to date state, and
letting the layout phase have an up to date size to layout in.

5 years agogtk/window: Let the backend handle toplevel freezing
Jonas Ådahl [Mon, 23 Nov 2020 20:08:40 +0000 (21:08 +0100)]
gtk/window: Let the backend handle toplevel freezing

5 years agowayland: Apply new surface state at the beginning of a frame
Jonas Ådahl [Mon, 23 Nov 2020 16:26:06 +0000 (17:26 +0100)]
wayland: Apply new surface state at the beginning of a frame

Concentrate state application to the start of a frame; this is to avoid
having GTK going back and forth between different state if so would
happen between two frames.

5 years agosurface: Only keep state 'withdrawn' after hiding
Jonas Ådahl [Mon, 23 Nov 2020 16:23:44 +0000 (17:23 +0100)]
surface: Only keep state 'withdrawn' after hiding

A hidden surface should start from a clean slate when showing again, so
clear any now out of date state.

5 years agowayland: Keep pending initial state separate
Jonas Ådahl [Mon, 23 Nov 2020 15:46:29 +0000 (16:46 +0100)]
wayland: Keep pending initial state separate

Queue it, and then wait for it to actually take effect, i.e. be
confirmed via a configure event from the compositor, before setting the
actual GdkSurface::state value.

5 years agogdk/surface: Add API to queue and apply state changes
Jonas Ådahl [Mon, 23 Nov 2020 15:39:11 +0000 (16:39 +0100)]
gdk/surface: Add API to queue and apply state changes

This will be used to compress state changes and apply as part of a frame
clock dispatch.

5 years agogdk/surface: Removed unused struct field
Jonas Ådahl [Mon, 23 Nov 2020 15:13:45 +0000 (16:13 +0100)]
gdk/surface: Removed unused struct field

The 'old_state' wasn't used anywhere, lets remove it.

5 years agogtk/window: Don't gdk_toplevel_present() if not mapped
Jonas Ådahl [Fri, 20 Nov 2020 16:11:44 +0000 (17:11 +0100)]
gtk/window: Don't gdk_toplevel_present() if not mapped

That would map the window too early.

5 years agogdk/toplevel: Make gdk_toplevel_present() async
Jonas Ådahl [Fri, 20 Nov 2020 15:56:36 +0000 (16:56 +0100)]
gdk/toplevel: Make gdk_toplevel_present() async

The plan is to concencrate size computations as part of the frame clock
dispatch, meaning we shouldn't do it synchronously in the present()
function.

Still, in Wayland, and maybe elsewhere, it is done in the present()
function, e.g. when no state change was made, but this will eventually
be changed.

5 years agowayland: Only set mapped state when mapped
Jonas Ådahl [Thu, 19 Nov 2020 09:54:20 +0000 (10:54 +0100)]
wayland: Only set mapped state when mapped

Mapping a surface under Wayland is an asynchronous process, where one
creates a surface and commits an initial state without having drawn
anything, then waiting for a configuration, which then is acknowledged
and content is painted and committed. Not until having received this
configuration is a surface actually mapped, so wait with setting the
mappedness until this.

5 years agowayland/popup: Use maybe_notify_mapped() helper
Jonas Ådahl [Thu, 19 Nov 2020 09:43:22 +0000 (10:43 +0100)]
wayland/popup: Use maybe_notify_mapped() helper

5 years agowayland: Decouple mapped state from surface creation
Jonas Ådahl [Thu, 19 Nov 2020 09:40:42 +0000 (10:40 +0100)]
wayland: Decouple mapped state from surface creation

5 years agoMerge branch 'wayland-inhbit0' into 'master'
Emmanuele Bassi [Mon, 7 Dec 2020 00:26:50 +0000 (00:26 +0000)]
Merge branch 'wayland-inhbit0' into 'master'

wayland: avoid referencing unallocated memory when uninhibiting

See merge request GNOME/gtk!2927

5 years agowayland: avoid referencing unallocated memory when uninhibiting
Michael Terry [Sun, 6 Dec 2020 23:36:58 +0000 (18:36 -0500)]
wayland: avoid referencing unallocated memory when uninhibiting

5 years agoUpdate British English translation
Zander Brown [Sun, 6 Dec 2020 22:08:30 +0000 (22:08 +0000)]
Update British English translation

5 years agoMerge branch 'ebassi/a11y-leak' into 'master'
Emmanuele Bassi [Sat, 5 Dec 2020 20:52:04 +0000 (20:52 +0000)]
Merge branch 'ebassi/a11y-leak' into 'master'

a11y: Plug a leak in the AT-SPI context

Closes #3450

See merge request GNOME/gtk!2926

5 years agoa11y: Plug a leak in the AT-SPI context
Emmanuele Bassi [Sat, 5 Dec 2020 20:25:30 +0000 (20:25 +0000)]
a11y: Plug a leak in the AT-SPI context

Fixes: #3450
5 years agoUpdate contribution guide
Matthias Clasen [Sat, 5 Dec 2020 16:34:52 +0000 (11:34 -0500)]
Update contribution guide

Make my feelings about bug reporting by screencast known.

5 years agoMerge branch 'revert-round-windows' into 'master'
Matthias Clasen [Sat, 5 Dec 2020 15:10:16 +0000 (15:10 +0000)]
Merge branch 'revert-round-windows' into 'master'

Revert "theme: Round all window corners"

See merge request GNOME/gtk!2921

5 years agoUpdate POTFILES.in
Piotr Drąg [Sat, 5 Dec 2020 14:05:48 +0000 (15:05 +0100)]
Update POTFILES.in

5 years agoMerge branch 'wip/jfelder/customsorter-null' into 'master'
Emmanuele Bassi [Fri, 4 Dec 2020 23:39:48 +0000 (23:39 +0000)]
Merge branch 'wip/jfelder/customsorter-null' into 'master'

customsorter: Add missing nullable annotation

See merge request GNOME/gtk!2923

5 years agocustomsorter: Add missing nullable annotation
Jean Felder [Fri, 4 Dec 2020 23:04:36 +0000 (00:04 +0100)]
customsorter: Add missing nullable annotation

5 years agoMerge branch 'wip/chergert/gdk-macos-for-master' into 'master'
Emmanuele Bassi [Fri, 4 Dec 2020 22:37:00 +0000 (22:37 +0000)]
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'

macos: fix GL renderer for macOS

Closes #3420

See merge request GNOME/gtk!2922

5 years agomacos: enable GL renderer by default
Christian Hergert [Fri, 4 Dec 2020 21:41:31 +0000 (13:41 -0800)]
macos: enable GL renderer by default

Now that the attribute locations are fixed for the GL renderer, we can
enable it by default on macOS.

Fixes #3420

5 years agogl: specify attribute locations for vUv and aPosition
Christian Hergert [Fri, 4 Dec 2020 21:33:34 +0000 (13:33 -0800)]
gl: specify attribute locations for vUv and aPosition

These positions are not guaranteed to be in a specific order when linked
into the final GPU program. They need to be specified so that our code
in gskglrenderer.c can use known positions for them to match up with
our GskQuadVertex.

This fixes the GL renderer on macOS's OpenGL shader compiler.

Fixes #3420

5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Fri, 4 Dec 2020 17:21:56 +0000 (17:21 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

emoji chooser: Fix incremental loading

Closes #3438

See merge request GNOME/gtk!2920

5 years agodocs: Fix up GtkPicture docs
Matthias Clasen [Fri, 4 Dec 2020 16:39:13 +0000 (11:39 -0500)]
docs: Fix up GtkPicture docs

These were missing proper linking.

5 years agoRevert "theme: Round all window corners"
Matthias Clasen [Fri, 4 Dec 2020 16:13:26 +0000 (11:13 -0500)]
Revert "theme: Round all window corners"

This reverts commit e46522e4b522aa163ca757436dc948b1d989530d.

5 years agoemoji chooser: Fix incremental loading
Matthias Clasen [Fri, 4 Dec 2020 15:58:24 +0000 (10:58 -0500)]
emoji chooser: Fix incremental loading

This broke when we started using GDK_PROFILER_CURRENT_TIME for
timekeeping - that gets defined to 0 when we're building without
sysprof, so we can use it to make such determinations. Go back
to using g_get_monotonic_time().

Fixes: #3438
5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Fri, 4 Dec 2020 04:12:41 +0000 (04:12 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

Matthiasc/for master

See merge request GNOME/gtk!2918

5 years agogtk-demo: Use a native filechooser in the words demo
Matthias Clasen [Fri, 4 Dec 2020 03:31:05 +0000 (22:31 -0500)]
gtk-demo: Use a native filechooser in the words demo

5 years agoMerge branch 'picture-docs2' into 'master'
Benjamin Otte [Fri, 4 Dec 2020 02:04:19 +0000 (02:04 +0000)]
Merge branch 'picture-docs2' into 'master'

Add docs about sizing pictures

See merge request GNOME/gtk!2917

5 years agoAdd docs about sizing pictures
Benjamin Otte [Fri, 4 Dec 2020 02:04:19 +0000 (02:04 +0000)]
Add docs about sizing pictures

Suggested by Christopher Davis.

5 years agogtk-demo: Use a native file chooser in the svg demo
Matthias Clasen [Fri, 4 Dec 2020 00:44:45 +0000 (19:44 -0500)]
gtk-demo: Use a native file chooser in the svg demo

5 years agogtk-demo: Use a native filechooser in the video demo
Matthias Clasen [Fri, 4 Dec 2020 00:36:53 +0000 (19:36 -0500)]
gtk-demo: Use a native filechooser in the video demo

5 years agogtk-demo: Remove empty row in the pickers demo
Matthias Clasen [Fri, 4 Dec 2020 00:24:19 +0000 (19:24 -0500)]
gtk-demo: Remove empty row in the pickers demo

The file chooser button is gone.

5 years agoMerge branch 'wip/chergert/macos-decelerate' into 'master'
Emmanuele Bassi [Thu, 3 Dec 2020 22:54:46 +0000 (22:54 +0000)]
Merge branch 'wip/chergert/macos-decelerate' into 'master'

macos: fix typo when creating scroll events

Closes #3418

See merge request GNOME/gtk!2916

5 years agomacos: fix typo when creating scroll events
Christian Hergert [Thu, 3 Dec 2020 21:44:14 +0000 (13:44 -0800)]
macos: fix typo when creating scroll events

This fixes an issue where we would ignore events with Y delta
and no X delta while scrolling due to a typo when checking for
any delta.

This fixes deceleration of kinetic scrolling on the macOS backend.

Fixes #3418

5 years agoMerge branch 'wip/chergert/gdk-macos-for-master' into 'master'
Matthias Clasen [Thu, 3 Dec 2020 20:07:16 +0000 (20:07 +0000)]
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'

macos: fix motion event delivery after closing transient window

Closes #3419

See merge request GNOME/gtk!2910